package com.sjg.sys.service;

import com.sjg.sys.entity.SysOrganization;
import com.sjg.sys.entity.SysResources;
import com.sjg.sys.utils.CommUtil;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;

import com.sjg.sys.dao.SysResourcesDao;

@Service
public class SysResourcesService{

    @Resource
    private SysResourcesDao sysResourcesDao;

    public int insert(SysResources pojo){
        pojo.setId(CommUtil.getPrimaryKey());
        return sysResourcesDao.insert(pojo);
    }

    public int insertSelective(SysResources pojo){
        pojo.setId(CommUtil.getPrimaryKey());
        return sysResourcesDao.insertSelective(pojo);
    }

    public int insertList(List<SysResources> pojos){
        for(SysResources resources:pojos){
            resources.setId(CommUtil.getPrimaryKey());
        }
        return sysResourcesDao.insertList(pojos);
    }

    public int update(SysResources pojo){
        return sysResourcesDao.update(pojo);
    }
}
